Error-Checking Constant
Open Transport provides a constant that you can use to initialize the port reference structure. You can then check that the current port reference is valid before passing it to functions. The constant is defined as follows:
enum kOTInvalidPortRef= ((OTPortRef)0)